import Layout from '/src/page/index/index.vue'
import {useCommonStore} from "../../store/modules/common.js";
import {mapStores} from "pinia";

const localStore = {...mapStores(useCommonStore)}

export default [{
  path: '/wel',
  component: () => import('/src/page/index/index.vue'),
  redirect: '/wel/index',
  children: [{
    path: '/wel/index',
    name: '首页',
    meta: {
      i18n: 'dashboard'
    },
    component: () =>
      import( /* webpackChunkName: "views" */ '/src/views/wel/index.vue')
  }, {
    path: 'more',
    name: '控制台',
    meta: {
      i18n: 'more',
      menu: false,
    },
    component: () =>
      import( /* webpackChunkName: "views" */ '/src/views/wel/dashboard.vue')
  }]
},{
  path: '/home',
  component: () =>  import('/src/page/index/index.vue'),
  redirect: '/home/index',
  children: [{
    path: 'index',
    name: '首页',
    meta: {
      i18n: 'dashboard'
    },
    component: () =>
        import( /* webpackChunkName: "views" */ '/src/views/wel/index.vue')
  }, {
    path: 'more',
    name: '控制台',
    meta: {
      i18n: 'more',
      menu: false,
    },
    component: () =>
        import( /* webpackChunkName: "views" */ '/src/views/wel/dashboard.vue')
  }]
},{
  path: '/iframe',
  //这里本来是直接写Layout，因为报错，所以写成了函数形式，返回Layout
  component: () => Layout,
  redirect: '/iframe',
  children: [{
    path: '',
    name: '',
    component: () =>
      import( /* webpackChunkName: "views" */ '/src/szcomponent/avue/iframe/main.vue')
  }]
}, {
  path: '/info',
  component: () => Layout,
  redirect: '/info/index',
  children: [{
    path: '/info/index',
    name: '个人信息',
    meta: {
      i18n: 'info'
    },
    component: () =>
      import( /* webpackChunkName: "views" */ '/src/views/user/info.vue')
  }, {
    path: 'setting',
    name: '个人设置',
    meta: {
      i18n: 'setting'
    },
    component: () =>
      import( /* webpackChunkName: "views" */ '/src/views/user/setting.vue')
  }]
}, ]